package com.vfmall.mapper;

import com.vfmall.annotation.AutoFill;
import com.vfmall.constant.AutoFillConstant;
import com.vfmall.dto.SetmealDTO;
import com.vfmall.dto.SetmealPageQueryDTO;
import com.vfmall.entity.Setmeal;
import com.github.pagehelper.Page;
import com.vfmall.enumeration.OperationType;
import com.vfmall.result.Result;
import com.vfmall.vo.SetmealVO;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Mapper
public interface SetmealMapper {

    List<Setmeal> list(Setmeal setmeal);

    /**
     * 分页查询
     * @param setmealPageQueryDTO
     * @return
     */
    Page<SetmealVO> pageQuery(SetmealPageQueryDTO setmealPageQueryDTO);

    @AutoFill(value = OperationType.INSERT)
    void insert(Setmeal setmeal);

    SetmealVO getById(Long id);


    @AutoFill(value = OperationType.UPDATE)
    void update(Setmeal setmeal);

    void deleteBatch(List<Long> ids);
}
